<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@ page import="java.util.List,java.util.Map,java.math.BigDecimal"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%
List list = (List) request.getAttribute("list");

int countques=(int) request.getAttribute("countques");
int pagenum=(int) request.getAttribute("page");
int pagecount=countques/5;
if(countques%5==0)
	pagecount=countques/5-1;
if(countques==0)
	pagecount=0;
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd 

">
<html>
<head>
<base href="<%=basePath%>">
 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>太原金属交易中心</title>
<link rel="stylesheet" href="<%=basePath%>css/common.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>lib/css/layer.css" />

<link rel="stylesheet" href="<%=basePath%>lib/css/swiper.min.css">
<link rel="stylesheet" type="text/css" href="<%=basePath%>css/index.css" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>lib/css/layer.css" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>lib/css/dropload.css" />
<script src="<%=basePath%>lib/js/jquery-2.1.4.js"></script>
<link
	href="<%=basePath%>bower_components/metisMenu/dist/metisMenu.min.css"
	rel="stylesheet">

<!-- DataTables CSS -->
<link
	href="<%=basePath%>bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.css"
	rel="stylesheet">
	
	<!-- Custom Fonts -->
<link
	href="<%=basePath%>bower_components/font-awesome/css/font-awesome.min.css"
	rel="stylesheet" type="text/css">
	
<style>
.sp_common_title {
	height: 0.78rem;
	width: 100%;
	border-top: 1px solid #cccccc;
	border-bottom: 1px solid #cccccc;
	color: black;
	text-align: center;
	line-height: 0.78rem;
	font-size: 0.32rem;
}
</style>
</head>
<body>
<div class="wrap activity_page">
    <section class="container">
        <section style="top:0;bottom: 0.95rem; overflow-y: scroll;-webkit-overflow-scrolling: touch;" class="active_wrap">
            <div class="activityBg">
                <ul class="isLogin clearfix" style="display: none;" id="jifenWrap">
                    <li><i class="icon"></i><span id="jf"></span></li>
                    <li><i class="icon"></i><span id="level"></span></li>
                </ul>
                <div class="swiper-container">
            
  <iframe src="http://chawang8.com:8081/trade1/jsp/echart/kxingtu.html" marginheight="0" marginwidth="0" frameborder="0" scrolling="no" width="100%" height="100%" id="iframecon" name="iframepage" onLoad="iFrameHeight()"></iframe>

 		     </div>
                
            </div>
       <a href="appguadan.html?goods=宝石" class="setting_logout"  >
    去交易
</a>
 <section  class="sp_common_title"  >
 
    <span>成交明细</span>
</section>  
				   
		<div class="withdrawrecord_content">
    <ul class="menu clearfix">
        <li>交易类型</li>
        <li>金额</li>
         <li>数量</li>
    </ul>
    <div id="wrapper">
        <ul class="detail">
            <% for(int i=0;i<list.size();i++){
				Map map = (Map)list.get(i);
				String a="";
				BigDecimal cc = (BigDecimal) map.get("repay");
				BigDecimal bb = (BigDecimal) map.get("income"); 
				int bb1 = bb.intValue();
				if(bb1==0) {
					a="买";
				}
				else if(bb1>0) {
					a="卖";
					cc = bb; 
				}
				%>
				<li class="clearfix">
                <div class="item">
                    <span><%=a %></span>
                 </div>
                <div class="item">
                    <span><%=cc%></span>
                 </div>
                 <div class="item">
                     <span class="cancel_withdraw"><%=map.get("tcount") %></span>
                </div>
            </li>
				<%
				}
				%>
     
        </ul>
    </div>
</div> 
<!-- 分页 -->
					<div class="row clearfix" style="text-align: center">
						<div >
							
								<%
									if (pagenum > 1) {
								%>
								<a href="appmain.html?page=<%=pagenum - 1%>&last=5" style="font-size:40px">上一页</a>
							
								<%
									}
								%>
								&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
								<%
									if (pagenum != (pagecount + 1)) {
								%>
								<a href="appmain.html?page=<%=pagenum + 1%>&last=5" style="font-size:40px">下一页</a>
								
								<%
									}
								%>
								<br>
								<ul class="pagination">
								<%
									int lenth = 0;
									int pagenow_min = 0;
									int pagenow_max = 5;
									if (pagenum > pagenow_max) {
										pagenow_max += 5;
										pagenow_min += 5;
									}
									if ((pagecount - pagenow_max) < 1) {
										lenth = pagecount - pagenow_min + 1;
									} else {
										lenth = 5;
									}

									for (int i = pagenow_min + 1; i < lenth + pagenow_min + 1; i++) {
								%>
								<li><a href="appmain.html?page=<%=i%>&last=5" ></a></li>
								<%
									}
								%>
								
							</ul>
							</br> 共
							<%=(int) (pagecount + 1)%>页                  当前 第<%=pagenum%>页
						</div>
					</div>


        </section>
      <ul class="footer" style="background: #fff;">
    <li class="footer-item">
        <a href="appmain.html?page=1&last=5" class="">
            <i class="icon icon_index active"></i>
            <p class="icon_title" style="color: #f23029">首页</p>
        </a>
    </li>
    <li class="footer-item">
        <a href="apptixian.html" class="">
            <i class="icon icon_invest"></i>
            <p class="icon_title">提现</p>
        </a>
    </li>
    <li class="footer-item">
        <a href="appchongzhi.html" class="">
            <i class="icon icon_activity"></i>
            <p class="icon_title">充值</p>
        </a>
    </li>
    <li class="footer-item">
        <a href="appmember.html" class="">
            <i class="icon icon_my "></i>
            <p class="icon_title" >个人中心</p>
        </a>
    </li>
</ul>

    </section>
</div>
</body>

<script src="<%=basePath%>lib/js/jquery.base64.js"></script>
<script src="<%=basePath%>js/wapframwork.js"></script>

<!--插件-->
<!--<script src="lib/js/dropload.js"></script>-->
<!--0807 1.2-->
<script src="<%=basePath%>lib/js/layer.js" type="text/javascript" charset="utf-8"></script>
 
<!--头部-->
<script src="<%=basePath%>lib/js/RainbowBridge.js" type="text/javascript" charset="utf-8"></script>
 <script type="text/javascript">
    setTitle(".sp_common_title", {'title':'投资记录'});
</script>
<script src="<%=basePath%>js/activity.js?v=1.2.2" type="text/javascript" charset="utf-8"></script>
<!-- DataTables JavaScript -->
<script
	src="<%=basePath%>bower_components/datatables/media/js/jquery.dataTables.min.js"></script>
<script
	src="<%=basePath%>bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.min.js"></script>


</html>
